<template>
  <div id="app">
    <router-view />
  </div>
</template>

<script>
export default {
  name: 'App',
  watch: {
    '$route.path': function(newPath, oldPath) {
      if (newPath !== '/travel/ticket/oneDay/issue') {
        if (document.getElementById('driver-popover-item')) {
          document.getElementById('driver-popover-item').style.display = 'none'
          document.getElementById('driver-page-overlay').style.display = 'none'
        }
      }
    }
  },
  // 解决刷新导致 vuex 数据丢失
  created() {
    // 在页面加载时读取sessionStorage里的状态信息
    if (localStorage.getItem('store')) {
      // 将store储存到session
      this.$store.replaceState(
        Object.assign(
          {},
          this.$store.state,
          JSON.parse(localStorage.getItem('store'))
        )
      )
    }
  }
}
</script>
<style>
.dingwei {
  /* // margin-top: 16px; */
  position: fixed;
  bottom: 0;
  width: 100%;
  padding-bottom: 20px !important;
  padding-top: 24px !important;
  background-color: white;
}
.el-table .cell {
  padding: 0 !important;
  padding-left: 24px !important;
  line-height: normal !important;
}
.el-table th > .cell {
  padding: 0 !important;
  padding-left: 24px !important;
  color: black;
}
/* 部分暫存样式
.el-dialog__header { */
/* padding: 24px !important;
  padding-bottom: 0 !important; */
/* } */
/* .el-dialog__body { */
/* padding: 24px !important;
  font-size: 16px !important;
  font-weight: 400 !important; */
/* color: #393939 !important; */
/* } */
/* .el-dialog__footer {
  padding: 24px !important;
  padding-top: 0 !important;
} */
.el-button-right {
  margin-left: 20px !important;
}
.el-table::before {
  height: 0px !important;
}
</style>
